package com.effectiv.gooruda.rest.api.domain;


import java.util.List;

import javax.validation.constraints.NotNull;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import org.hibernate.validator.constraints.Email;

import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.DBRef;

import com.effectiv.gooruda.rest.docs.core.annotation.ApiObject;
import com.effectiv.gooruda.rest.docs.core.annotation.ApiObjectField;
@ApiObject(name = "User")
@ToString
@Deprecated
public class User extends PesistentBase{

	
	private static final long serialVersionUID = 1L;
	
	@ApiObjectField(description="A valid email address. This is unique for an application", format="example - dhrubo@gooruda.com")
	@Indexed(unique = true)
	@Email
	@Getter
	@Setter
	private String email;
	
	@ApiObjectField(description="A use name. This is unique for an application")
	@Indexed(unique = true)
	@NotNull
	@Getter
	@Setter
	private String userName;
	
	@ApiObjectField(description="Password.")
	@NotNull
	@Getter
	@Setter
	private String password;
	
	@ApiObjectField(description="Roles assigned to the user.")
	@Getter
	@Setter
	@DBRef
	private List<Role> roles;
	
	@ApiObjectField(description="Tracks if the user is locked.", allowedvalues={"true", "false"})
	@Getter
	@Setter
	private boolean locked;
	
	@ApiObjectField(description="Present address of the user.")
	@Getter
	@Setter
	private Address presentAddress;
	
	@ApiObjectField(description="Permanent address of the user.")
	@Getter
	@Setter
	private Address permanentAddress;
	
	@ApiObjectField(description="User profile details.")
	@Getter
	@Setter
	private Profile profile;
}
